#pragma once

#include "../QRSWidgetBase.h"
#include "ui_QCreateFromObjectOperation.h"

#include "Render/QIVtkSelectionPipeline.h"

QT_BEGIN_NAMESPACE
namespace Ui { class QCreateFromObjectOperationClass; };
QT_END_NAMESPACE

class MainWindow;
class ShapeOperation;

class QCreateFromObjectOperation : public QRSWidgetBase
{
	Q_OBJECT

public:
	QCreateFromObjectOperation(MainWindow* inMainWindow, ShapeOperation* inOperation = nullptr, QWidget* parent = nullptr);
	~QCreateFromObjectOperation();
protected:
	void OnSelectedSubShapes(QIVtkSelectionPipeline* actor);
	virtual void closeEvent(QCloseEvent* event) override;

	void OnModify();
	void OnConfirm();

	void OnTargetComboIndexChange(int index);

	bool CreateInner();
private:
	Ui::QCreateFromObjectOperationClass *ui;

	QIVtkSelectionPipeline* m_selectedActor = nullptr;
};
